import request from '@/utils/request'

// 查询单词列表
export function listWord(query) {
  return request({
    url: '/english/word/list',
    method: 'get',
    params: query
  })
}

// 查询单词详细
export function getWord(wordId) {
  return request({
    url: '/english/word/' + wordId,
    method: 'get'
  })
}

// 新增单词
export function addWord(data) {
  return request({
    url: '/english/word',
    method: 'post',
    data: data
  })
}

// 修改单词
export function updateWord(data) {
  return request({
    url: '/english/word',
    method: 'put',
    data: data
  })
}

// 删除单词
export function delWord(wordId) {
  return request({
    url: '/english/word/' + wordId,
    method: 'delete'
  })
}

// 导出单词
export function exportWord(query) {
  return request({
    url: '/english/word/export',
    method: 'get',
    params: query
  })
}